<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Article;
use Theme;

class ArticlesController extends Controller
{
  /**
   * Display a listing of the resource.
   *
   * @return Response
   */
  public function index()
  {
    $articles = Article::orderBy('id', 'desc')->with('category')->paginate(20);
    return Theme::view('admin.articles.index', compact('articles'));
  }
}
